import React,{Component} from 'react';
import {Platform, StyleSheet, Text,ScrollView, View, TouchableOpacity, Alert,Image ,ImageBackground } from 'react-native';

export default class CourseDetails extends Component{
    static navigationOptions = {
        headerStyle:{
            backgroundColor:'#d04542',
            height:50,
        },
        headerTintColor:'white',
    };
	render(){
		return(
			<ScrollView style={styles.ScrollView}>
				<TouchableOpacity style={styles.container}>
					<ImageBackground source={require('../img/133.png')} style={{width: '100%', height: '100%'}}>
					    <Text style={styles.imgTitle}>上海老年开放大学</Text>
					</ImageBackground>
				</TouchableOpacity>
				<TouchableOpacity style={styles.container}>
					<ImageBackground source={require('../img/133.png')} style={{width: '100%', height: '100%'}}>
					    <Text style={styles.imgTitle}>上海老年开放大学</Text>
					</ImageBackground>
				</TouchableOpacity>
				<TouchableOpacity style={styles.container}>
					<ImageBackground source={require('../img/133.png')} style={{width: '100%', height: '100%'}}>
					    <Text style={styles.imgTitle}>上海老年开放大学</Text>
					</ImageBackground>
				</TouchableOpacity>
				<TouchableOpacity style={styles.container}>
					<ImageBackground source={require('../img/133.png')} style={{width: '100%', height: '100%'}}>
					    <Text style={styles.imgTitle}>上海老年开放大学</Text>
					</ImageBackground>
				</TouchableOpacity>
			</ScrollView>
		);
	}
}
//contain, cover, stretch, center, repeat.	 
const styles = StyleSheet.create({
	ScrollView:{
		backgroundColor:"#F2F2F2",
	},
	head:{
		flexDirection:'row',height:50, backgroundColor:"#D04542",
	},
	headTitle:{
		height:50,textAlign: 'center',fontSize: 18,
	  	fontWeight:'bold',lineHeight: 45 ,color: 'white',
	},
	headLetf:{
		flex:1,justifyContent:'center',margin:5,alignItems:'center',
	},
	headCenter:{
		flex:6,margin:5,
	},
	headRight:{
		flex:1,alignItems:'center',justifyContent:'center',margin:5,
	},
	container:{
		backgroundColor:"red",height:150,margin:10,
	},
	imgTitle:{
		fontSize: 18,color: 'white',marginTop:120,marginLeft:8,
	},
});
